Method for generating an analog signal generated by pwm signal, and system generating such signal

ABSTRACT

The present invention relates to a generation method of an analogue signal generated by a PWM signal whose cyclic ratio and period are parametrizable. It is thus possible choose the pair formed from the cyclic ratio and the period producing an analogue value that is the closest to the value corresponding to the programmed command value. But the differences between the analogue values can be very great and generate zones of imprecision of variable width. Outside of these zones, the generated analogue signal is very precise. As a result, when the command value associated with a pair is imprecise, a digital shift is applied to the command value at the same time as the application of an analogue shift means. Both shifts have the same amplitude and of opposite directions such that the cancel each other out, producing a precise analogue value. 
     The present invention also relates to a device for generating an analogue signal implementing the method.

The present invention relates to a method for generating an analoguesignal generated from a PWM signal, and a system generating such asignal.

In the domain of the electrical process control, it is necessary toproduce analogue signals from digital data. A simple means consists inusing a Digital Analogue Converter (DAC). A Central Processing Unit(CPU) controls the converter by introducing a digital value ofdetermined precision into an input register. The analogue precision isall the greater as the control digital value in bits of the DACincreases. DACs with 16 bit registers are commonly found commerciallyavailable, the central processing unit is able to introduce 65536different values for a voltage varying from 0 volts to 10 volts, and a16 bit DAC generates two consecutive values with a difference of 0.15millivolts, that is to say a precision of 0.0015%.

The price of the Digital Analogue Converters increases as the precisionis increased and the conversion time is more rapid. If a rapidconversion time is not required, the Pulse Width Modulator (PWM) signalsenable supply of an analogue voltage from a digital magnitude. A PWMsignal is a digital signal comprising two states “0” and “1”, thissignal is periodic and produced by division of a base clock. During aperiod, the time duration during which the signal is at 1 is adjustable.By convention, the cyclic ratio corresponds to the ratio between thetime where duration of the signal is at “1” to the total time of thesignal period. Take as an example a PWM signal generator having an 8-bitprogram register in which the value “1” is programmed, the digitalsignal obtained is at “1” for a single base pulse and at “0” during thefollowing 255 base pulses. The digital output of the PWM signal isconnected to an RC integrator circuit that smoothes out the periodicsignal. A continuous value is thus obtained that can be amplified tocontrol a motor for example.

The applications of PWM signals to control items of equipment requiringan analogue electrical magnitude at input are very numerous. Typically,a motor or the intensity of a lamp, can be regulated, the power of anamplifier can be adjusted, etc. PWM signals are found in televisiondecoders to control the fan speed. In fact, these electronic devicesconsume a great deal of energy during normal operation. This energy istransformed into heat that is concentrated within devices that aregenerally sealed. If it is not evacuated this heat provokes anaccelerated ageing of electronic components that results in irreversibledeterioration. To prevent this, a fan is positioned close to air inletsin the casing of the decoder to accelerate exchanges with the exteriorand improve cooling. But using a fan at full speed is noisy. If thedevice is placed in a room, the sound level can be disturbing.Experimentation has shown that it is not the speed that is audible butrather the variation in speed. When the values are introduced into thePWM generator and a continuous voltage has thus been produced, theprogression of one value to a next value is audible, especially whenthis variation intervenes regularly as is the case for a control system.The characteristics of fans vary from one device to another. As a resultthe control system must provide the commands in an extensive commandrange and thus have a high level of precision over the entire range

To improve the precision of the control signal, a solution consists inincreasing the number of bits of the register that controls the timeduration over which the signal is at “1”. For example if this is a 12bit register, the precision goes to 1/4096=0.025%. But a 12 bit PWMgenerator is more expensive than an 8 bit PWM generator, in additionwith the same base frequency the period is 16 times longer, thus it isslower to react.

Another solution consists in varying both the period and the cyclicratio. To do this, the PWM signal generators are equipped with twocontrol registers, one to program the time duration of the periodicsignal, that is to say the period, noted as “PER”. The other registerprograms the time duration, noted as “T_ON” during which the signal isat “1”. The cyclic ratio is the result of the ratio TON/PER, it isalways less than 1 as T_ON is always less than PER. The value of theanalogue magnitude generated is directly proportional to the cyclicratio. For an 8 bit PWM generator, by modifying both the PER and T_ONvalues a lot more than 256 possible values are obtained, and so, thereis a very high number of pairs finally enabling as many differentvoltage values to be generated.

By respecting the rule: T_ON≦PER, the following are obtained:

If PER=255, then 256 values are possible for T_ON.

If PER=254, then 255 values are possible for T_ON.

If PER=253, then 254 values are possible for T_ON.

. . .

If PER=2, then 3 values are possible for T_ON (0, 1 or 2).

If PER=1, then two values are possible for T_ON (0 or 1): the signal isthen continuously at “0” or “1”.

The null value for PER has no meaning.

The possible number of pairs is the result of an arithmetic progressionfor which the formula is Σ=255×((1+255)/2)=32640 different (T_ON/PER)pairs.

It is noted that some decimal values obtained carrying out the ratioT_ON/PER are identical, for example:1/2=2/4=4/8=8/16=16/32=32/64=64/128. The calculation demonstrates thatthere are 19947 pairs (T_ON, PER) producing different decimal valuesthat generate as many different analogue levels. These 19947 decimalvalues are comprised between 0 and 1 and it can be assumed that anydecimal value will be produced with a minimal precision of 1/19947.Unfortunately, the precisions vary considerably from one value toanother.

In fact, in organizing the 19947 decimal values generated by all thepairs (T_ON, PER) in a list of increasing values, it is noted that thedifferences between two consecutive values vary considerably. In themajority of cases, the differences between the decimal values are of0.000016, which produces a precision of 1/62000 approximately but in acertain zone of the list, the difference sharply increases and can riseto 0.001961, which lowers the precision to 1/510. When there is a wishto produce a regular variation of analogue values, such a differencecauses a linearity default. This sharp rise in difference between twocyclic ratios is due to the fact that the ratios T_ON/PER providediscrete decimal values that do not offer the same difference betweeneach other.

The document US 2005/110668—CHIN DOUGLAS describes a way of improvingthe precision of a DAC. A determined voltage Vd is generated at theinput of the PWM. The PWM generator provides a signal having two levels:0 volt and Vd according to a variable cyclic ratio. The signal providedby the PWM is then filtered to generate a continuous voltage thatdepends on the value Vd and the cyclic ratio of the PWM, which enables afine adjustment of the output voltage. This document only considerscertain period and cyclic ratio values generating a high degree ofimprecision and it would be best not to use them.

The document U.S. Pat. No. 6,593,864—REILLY Timothy describes a PWMgenerator for which the signal is integrated to provide an analoguevoltage. A compensation circuit enables the drift due to the temperatureover time to be reduced. The voltage at the output of the integrator iscompared to a reference value, and if the difference is great, a stateis applied at the Up/Down input of a counter to modify the parameters ofthe PWM (ref. 22) in such a way as to retain the same level of analogueoutput over time. This document only considers certain period and cyclicratio values generating a high degree of imprecision and it would bebest not to use them.

The document EP 1 575 171—PATRA PATENT describes a PWM generator that ismodulated by an electronic circuit generating a wave form that is cyclicand synchronised with the period of the PWM. This electronic circuitadds a modulation to the PWM signal, that enables the precision to beimproved overall. This document only considers certain period and cyclicratio values generating a high degree of imprecision and it would bebest not to use them.

The present invention thus enables the effect of non-linearity due tothe fact that some period and cyclic ratio values generate imprecisionto be reduced and thus is able to produce from a PWM signal analoguevalues with a high level of precision.

One of the purposes of the present invention is a method for generatingan analogue signal generated from a PWM signal having a first periodvalue and a first cyclic ratio value associated with a command value,said PWM signal being electrically integrated to produce the analoguesignal,

characterized in that it comprises an application step of a secondperiod value and a second cyclic ratio value producing a PWM signal forwhich the electrically integrated signal is shifted by a predeterminedamplitude, and an activation step of an analogue device generating ashift of the analogue signal generated from the PWM signal, theamplitude of the shift of the analogue signal produced from the PWMsignal being identical and in the opposite direction to that produced bythe application of second period and cyclic ratio values.

In this way, if the command value cannot correspond precisely to a givencyclic ratio and period pair, then by carrying out a shift in the valuesof pairs to find a pair of second cyclic ratio and period valuesgenerating a given amplitude and by commanding an analogue shift of thesame amplitude and in the opposite direction, the precise expectedcommand value is obtained.

According to a first improvement, the application step of second periodand cyclic ratio values, and the activation step of an analogue devicegenerating a shift are executed when the difference between the value ofthe electrically integrated signal and the theoretical value obtainedfrom the command value is greater than a threshold value. In this way,it is possible to set parameters for the triggering of the shift.

According to an improvement, the user can introduce a threshold value tocompare with the difference in order to determine if it is necessary tocommand a shift. This adds more flexibility and enables too numerousshifts to be avoided if the desired precision is average. According toanother improvement, the decision to execute the two mutuallycompensating shifts is determined in advance for all the command values.Advantageously, the decision is presented in the form of an indicatorregistered for each command value to be applied. In this way, thedecision to command a shift is immediately taken.

According to another improvement, the executions of the application stepof second period and cyclic ratio values and of the activation step ofan analogue device generating a shift of the analogue signal are shiftedin time. In this way, the slowest shift means starts first so that theother means will rapidly compensate the difference without it generatingtoo great an artefact. According to this improvement, the activationstep of the analogue device generating a shift of the analogue signal isexecuted at the end of the first period during which the second periodand cyclic ratio values are applied. In this way, the first PWM periodis already programmed and starts to produce a shift when the shift ofthe analogue signal occurs a little later but as it is more rapid, theeffects will mutually and dynamically be reduced.

According to another improvement, if the analogue device generating ashift of the analogue signal immediately applies the amplitude, thenconsecutively at the activation step of the analogue device generating ashift of the analogue signal, the first period and cyclic ratio valuesapplied are increased to take into account the delay in establishmentdue to the integration of the PWM signal, in such a way to limit thesharp difference generated by the analogue shift In this way, it ispossible to compensate for the artefacts generated during the activationof the analogue device that has an immediate effect while the analoguesignal produced by the second period and cyclic ratio values is slowerto establish due to the time constant of the integrator circuit.

According to another improvement, the PWM signal generation device has acircuit for selecting the value of the shift of the analogue signal fromamong a plurality of predetermined values. In this way, several analogueshift values can be obtained and thus a better precision. According toanother improvement, a self-learning device enables the value of theshift of the analogue signal to be calculated so that this value isidentical to that produced by the application of other period and cyclicratio values producing a PWM signal for which the electricallyintegrated signal is shifted. In this way, it is possible to calibratefrom an autonomous functioning of the device and thus improve theintrinsic precision of each device.

Another purpose of the present invention is a device for generating ananalogue signal generated from a PWM signal characterized by a firstperiod value and a first cyclic ratio value associated with a commandvalue, comprising an integration means of the PWM signal to produce ananalogue signal,

characterized in that it comprises a means for generating second periodand cyclic ratio values to produce another PWM signal for which theelectrically integrated signal is shifted by a predetermined amplitude,and means for shifting a signal generated from the PWM signal andelectrically integrated producing a shift for which the amplitude isidentical and in the opposite direction to that produced by the means ofgeneration of second period and cyclic ratio values.

Other characteristics and advantages of the present invention willemerge from the description of the following embodiments to be taken asnon-restrictive examples, made with reference to the annexed figureswherein:

FIG. 1 shows a section of an electronic device according to anembodiment of the invention,

FIG. 2 illustrates a generation system of a variable analogue signalaccording to a preferred embodiment.

FIG. 3 presents an example of a correspondence table enabling extractionof period and cyclic ratio pairs in order to generate a variableanalogue signal,

FIG. 4 presents a curve of levels of imprecision of command hexadecimalvalues ranging from 0000 to 65536 in decimal,

FIG. 5 presents a flowchart of steps enabling a precise analogue signalto be provided, according to an embodiment

FIG. 6 shows an example of an electronic schema enabling an analogueshift applied to a signal produced by a PWM signal generator to beimplemented,

FIG. 7 shows an example of an electronic schema where the analogue shiftis carried out while synchronizing with the digital shift application.

FIG. 1 describes a section of an electronic device, a television decoderfor example. The device comprises a printed circuit 1 on which theelectronic circuits 2 are arranged. A hard disk 3 enables recording ofdata, particularly of lengthy audiovisual works. The circuits 2 and thehard disk 3 consume a large amount of energy and release heat. Forexample, the CPU of the decoder 2 typically releases approximately 6watts of energy. As a result, certain zones of the decoder, marked ingrey on the FIG. 1, are warmer than others. A fan 4 extracts hot airfrom within the decoder. Two ventilation air-inlets 5 cut into thedecoder casing enable two cool air inlets. Curved arrows show the pathof the air flows. The number, the position and the size of theair-inlets are important elements of good ventilation, these parametersbeing well known to those skilled in the art.

FIG. 2 illustrates a generation device D of an analogue signal enablingcontrol of the speed of the fan V according to a preferred embodiment ofthe invention. This figure is applicable to all generation systems of ananalogue signal that receives a digital value at the input and suppliesa PWM signal at the output. In the embodiment described, the managementunit M is one of the circuits 2 of the board or part of a circuit 2, itsfunction is to maintain the speed of the fan as close as possible to aset speed. The management unit M has a digital input to receive signalsrepresentative of the fan speed (these signals are generally called“Tachy”) and a command output to control the fan 4 or V on FIG. 2. TheTachy signal is a pulse signal, the number of pulses per unit of timedetermines the real speed of the fan. According to the Tachy signal, themanagement unit 6 calculates the fan speed V and enables any correctionsto maintain the speed as close as possible to the value of the setspeed.

The generation device D generates a PWM signal to control the speed ofthe fan. The digital signal is converted into an analogue signal usingan integration means, typically a low pass filter constituted of aresistor R and a capacitor C. Then the analogue signal is amplified,using a transistor or an amplification circuit A. The analogue voltageapplied may vary between 0 and 12 volts, but generally the fan does notturn for a voltage less than approximately 5 volts, and it becomes toonoisy if 9 volts are exceeded. As a result, the useful range of commandvalues of the motor varies between 41% and 75%, which confirms thenecessity of having a good level of precision within this quite narrowrange. In the context of the invention, the time duration of theperiodic signal PER and the time duration during which the signal is at“1” T_ON can be programmed.

According to a first simple embodiment, the analogue signal generationsystem calculates command values on 16 bits to control the fan. Thegeneration system has a correspondence table recorded in the memorythat, for each command hexadecimal value provides a pair (T_ON, PER)able to produce this command value. This table of 65536 values is anordered list of pairs (T_ON, PER). As previously stated, 19947 differentvalues of cyclic ratios are possible, as a result, some pair values canbe associated with a same command value.

The table of FIG. 3 is an example of a correspondence table. Supposethat the analogue signal generation system calculates a command value8096H (32918 in decimal), the table provides the values PER=219 andT_ON=110, the system programs the two registers of the PWM with thesevalues. It is also possible to reduce the table so that the number ofinput values is a number equal to a lower power of 2 than 16, forexample 2 to the power of 14 or 2 to the power of 12. Some pairs (T_ON,PER) will then disappear as the associated decimal values are very closeto other values that remain in the table. The memory zone occupied bythe table is thus optimized.

Most microcontrollers manipulate data on 16 bits, a correspondence tableindexed by a value on 16 bits will be retained in the documenthereafter. This table thus contains 65536 values.

It will be observed using the table of FIG. 3 that two consecutivecommand values are generally associated with two different pairs (T_ON,PER). But this is not always the case, for example for the commandvalues: 808BH and 808CH, or: 8090H and 8091H, or even: 80A3H and 80A4,the table only provides a single pair (T_ON, PER). As a result, for oneof the two command values, the precision passes from 0.16.10⁻⁶(=1/65536) to 0.32.10⁻⁶ (= 1/32768). For other values, the precision fallsconsiderably, for example around the value 8000H, the following commandvalues and pairs (T_ON, PER) are found:

Hexa index PER/T_ON Decimal value Precision 7F7EH (252, 126)0.498023715415 16.10-6 7F7FH-7FBFH (254, 127) 0.498039215686 16.10-6 to1961.10-6 7FC0H-8040H (255, 128) 0.500000000000 16.10-6 to 1960.10-68041H-8080H (254, 128) 0.501960784313 16.10-6 8081H (252, 127)0.501976284584 16.10-6

The pair (T_ON, PER)=(252, 127) is associated by the table with 126command values. It can be seen that the precision for some commandvalues is only 1960.10−6= 1/510, instead of 1/65536 or 1/32768, that isgenerally found elsewhere. The zone of command values comprised between7F7FH and 8080H is a zone of imprecision. Namely nnnnH a command valueon 16 bits, the associated pair (T_ON, PER) must produce a cyclic ratiofor which the decimal value T_ON/PER is very close to nnnH/10000H. Ifthe difference between the ratios T_ON/PER and nnnnH/10000H is toogreat, the command value nnnnH associated with the pair (T_ON, PER) isimprecise. It will be seen hereafter, how to evaluate the level ofimprecision. The present invention will consist not in extracting fromthe table a pair (T_ON, PER) corresponding to an imprecise command valuebut in implementing a digital shift by using another command value thatis precise and in applying an analogue shift by modifying a parameter ofthe amplifier. By ensuring that the two shifts are of the same amplitudebut in opposite directions, they will cancel each other out.

The value of the digital shift to apply to the command value iscalculated in the following way. First it is of use to specify that thecommand values associated with an imprecise pair (T_ON, PER) areperfectly determined. FIG. 4 shows the level of imprecision of eachcommand hexadecimal value between 0000 and 10000H. As shown in FIG. 4,the zone of maximal imprecision is situated exactly at the middle of thetotal range of command values that is to say it is centred around thevalue 8000H. As it is the range for which the imprecision value ismaximal, it serves as a reference for the correction and thus for thedetermination of the shift. It is noted that the shifts between twocommand values in the zone of maximal precision are of the order of16.10⁻⁶ and that the zone of maximal imprecision comprises two valuesfor which the total is 1961.10⁻⁶+1960.10⁻⁶=3921.10⁻⁶. The value3921.10⁻⁶ represents the width to the range of maximal imprecision. Thenumber of precise values that can be obtained in this range byimplementing the ratio 3921.10 ⁻⁶/16.10⁻⁶=is 245. As a result byimplementing a digital shift of 245 command values, we can be sure ofavoiding the zone of imprecision and by pointing the table with this newvalue, a precise command value associated with a pair (T_ON/PER) can beextracted. For greater operating ease, the value of 245 is “rounded-off”to the closest power of 2, that is to say 256. The shift will thusconsist in adding 0100H to the command hexadecimal value, in other wordsin adding a unit to the “Most Significant Byte” of the commandhexadecimal value.

The microcontroller M generates a PWM signal whose value is greater by0100H than the one calculated by the generation device D. To compensatefor this shift, an analogue device is implemented to lower this level byas much. The PWM signal generated by the microcontroller is a digitalsignal with two voltage levels: 0 or 5 volts 0 volts are generated for acommand value of 0000 and 5 volts for FFFFH. A shift of 0100H thus leadsto a variation of 5/256=0.0195 volts. The analogue shift consists inlowering the analogue level by 19.5 millivolts.

FIG. 5 is a flowchart example showing the operations enabling preciseanalogue values generated by a PWM signal to be generated. At step 5.1,the generation device D determines a command value. Using this commandvalue, the device searches the pair table for the pair (T_ON; PER)capable of generating the PWM signal that supplies the analogue valueclosest to the one requested (step 5.2). At the same time, the devicereads, in the table, the level of imprecision associated with thecommand value for which a pair (TON; PER) is determined. At step 5.3,the level of imprecision is tested and if this level is below apredetermined threshold, then the pair found is effectively applied inthe PWM generator. If the level of imprecision exceeds the threshold,then the generation device D activates a command port of themicrocontroller which has the effect of generating a shift of theanalogue signal produced by the PWM signal (step 5.4). As a result, theanalogue signal will increase by a certain value. The generation deviceD subtracts, from the command value a quantity equal to the oneproducing the shift of the analogue signal and obtains a new commandvalue that can address the table with a view to searching for a new pair(T_ON; PER) (step 5.5). Advantageously, the command for generating theanalogue shift and the introduction of the new pair (T_ON; PER)generating the digital origin shift is not carried out at the same time,but the order and time interval depend on the time constants of the twoshift generation means. In a simple embodiment, the average constantsare calculated and the two shifts are applied one after the other byspacing them at a determined period.

According to an improvement, and particularly in the case where aresistive network is used to produce the analogue shift, this shift isinstantaneous, which is not the case for generating the analogue signalobtained following the application of the digital shift. Indeed, thecorrect analogue value is only obtained at the end of a PWM signalgeneration period. Thus, in this case, the new pair (T_ON; PER) is firstapplied to the PWM generator, then after a period equal to the periodPER of the PWM signal, the analogue shift is applied. In this way, theshifts occur at almost the same time, which considerably limits thepresence of artefacts on the analogue signal finally produced.

As noted previously, the shift generated in an analogical manner has thesame amplitude as the shift obtained by choosing another pair (T_ON;PER) than the one corresponding to the command value calculated by thegeneration device. The shifts being in the opposite direction, theycancel each other out and an analogue value corresponding to the commandvalue calculated is obtained. A precise analogue signal is obtainedsince obtained from a precise command value, whereas the command valueinitially calculated by the generation device D is not so.

It therefore remains to define at which time a command value isconsidered to be imprecise, which triggers the use of shifting. As notedpreviously, the zones of imprecision are perfectly located, such that itcan be calculated, in the factory, for each command value nnnnH thedifference between the ratio T_ON/PER and nnnnH/10000H. According to asimple embodiment, the correspondence table contains a new columncontaining the value of the difference. For an 8-bit PWM generator, thesmallest difference is 16.10⁻⁶. The analysis of all the differencesshows that there is a large command succession having a difference lessthan 32.10⁻⁶, which is the double of the smallest difference, andguarantees a precision of ½¹⁵, which is completely satisfactory.According to a first embodiment, the test carried out in step 5.3therefore consists in comparing the value of the differencecorresponding to the command value with the threshold of 32.10⁻⁶. If thevalue of the difference is greater than the threshold, then the shiftsare triggered. According to an embodiment variation, the generationdevice D offers the operator the possibility of introducing a thresholdvalue using a keyboard for example.

This implementation embodiment is particularly flexible as an operatorcan adjust the threshold value and thus increase the threshold byreducing the precision, this in order to limit the use of shifts.Moreover, if the generation device D can determine in advance that thecommand values will change within a range of variation containing a fewimprecise values, it can decide to trigger a shift so as to change thecommand values within a range only containing precise values. Forexample, suppose that during a long period, the regulation system Dsends, to the fan, command values comprised between 8240H and 8400H thusdefining the adjustment range, and that the system observes by analysingthe table that a zone of imprecision starts at the value 83D0H. Theadjustment system then immediately decides to shift the variation rangeto prevent frequent shift commands during the adjustment in the range.The shift will therefore be launched for all the variation range even iffor the values comprised between 8240H and 83CFF, this would not benecessary.

According to an embodiment variation, the manufacturer of the adjustmentdevice determines in advance the triggering of the shift according to asingle imprecision. The new column of the correspondence table thuscontains an indicator commanding the shift. This new column contains thevalue of the bit to apply on the output port controlling the analogueshift, the value of this bit also triggers the digital shift.

FIG. 6 shows an example of an implementation circuit diagram of anintegrator amplifier of PWM signals suitable to implement the presentinvention. The network R1, C constitutes the integrator filter of thePWM signal supplied by the microcontroller M. The resistance bridgeconstituted by R1 and R2/R3 polarises the transistor T. The resistor R3is connected to an output digital port of the microcontroller M. Thevoltage supplied by the output port is either 0 volt, or 5 volts.Without analogue shifting, the level of the port is +Vcc. When a shiftis applied, the resistance values R1, R2 and R3 are determined so thatthe voltage is lowered by 19.5 millivolts by applying 0 volts on theoutput port. The transistor T amplifies the analogue signal applied toits base to control the speed of the fan.

According to another improvement, the microcontroller has several outputports for commanding analogue shifts having different amplitudes. Thestatus of the “n” output ports is controlled by a new value of “n” bits,each port creating a shift whose amplitude is the double of the onegenerated by the port controlled by the bit with an immediately lowerrank. Starting from FIG. 6, several output ports are used to send asignal to the base of the transistor through a calibrated resistor: R31,R32, R33, etc. (not shown in the figure). The value of each resistor isa function of the voltage shift to be achieved. Once the width of themaximum imprecision range is calculated, the first port that correspondsto the most significant bit must generate a first analogue shift atleast equal to the maximum imprecision shift width. The second port thatcorresponds to the immediately less significant bit generates a secondshift less large by half than the first. And so on, experience showsthat excellent results are obtained with 3 output ports, and therefore 3bits which allows seven analogue shift values. In the case where thehexadecimal command value programmed by the generation device D isimprecise, the programming of the output statuses of the ports thatgenerate the analogue shift is carried out according to the width of theimprecision range measured for this command value. The larger theimprecision range, the greater the shift must be to command precisemeasures from pair (T_ON; PER) associated with a command value.

According to the variant embodiment where the manufacturer of the devicedefines, in the correspondence table, an indicator commanding the shift,this indicator, the new column contains the value of the bits to applyon the output ports commanding the analogue shift. The amplitude of thedigital shift is a function of said value. Advantageously, themanufacturer of the device also has in the new column of the table thevalue to add to the command value. If the command value of the portstriggering the shift is equal to “0000”, then the value to add to causea digital shift is also “0”.

According to another improvement, FIG. 7 shows an example of animplementation circuit diagram of an integrator amplifier of PWM signalssuitable to implement the present invention and having a means forsynchronizing the two shifts. With respect to FIG. 6, a flip-flop hasbeen added applying on its output Q the logical state present on itsinput D, the update being carried out on a rising edge of the PWMsignal. By convention, the rising edge of the PWM signal terminates theperiod. During the application of a new command value, the values T_ONand PER are extracted from the table and applied to the PWM generator.Suppose that the application of this new pair (T_ON, PER) requires ananalogue shift, the output port is set to 0 volts. The analogue shiftwill only be made at the end of the period of the PWM, that is duringthe rising edge. In this way, it is no longer useful to wait for aperiod equal to the period for applying the analogue shift, theflip-flop will synchronize the application of the two shifts. Thevariation of the analogue signal caused by the application of the newvalues T_ON and PER is perfectly compensated for by the generation ofthe analogue shift and this at the same time. As a result, these twoconcomitant actions limit the presence of artefacts at the level of theanalogue signal finally generated.

According to an implementation embodiment, the generation of PWM signalshas a base frequency 20 kHz and the time constant chosen for R1 and C is1 millisecond. During experiments, an artefact was observed at the timeof setting up the shift. This artefact is due to the fact that theanalogue shift is applied immediately to the output signal as it resultsfrom a resistive network, whereas the digital shift results from a PWMsignal by an integrator circuit having a certain time constant. Tocompensate this artefact as much as possible and according to animprovement of the present invention, the generation device D that knowsthe time constant of the integrator circuit will apply a pair succession(T_ON, PER) that will compensate for the slight delay generated by theintegrator circuit. For example, it is seen that during the passage ofthe period of one millisecond, the analogue signal at the output of theintegrator circuit will reach the determined value. The generationdevice D will then apply, during the two or three first PWM periods, avalue with a large difference with respect to the command value, adifference generating a shift that very rapidly compensates for the oneof the analogue shift. Then during following periods, the generationdevice applies the command value extracted from the table.

According to another improvement, the generation device D comprises aself-calibration device enabling the analogue shift value produced bythe analogue shift device to be evaluated accurately. Initially, themicrocontroller selects a first command value in a precise zone andapplies the pair (T_ON; PER) extracted from the table and the analogueshift by activating an output port. Using the tachymetric probe, themicrocontroller measures the speed with an accuracy of at least 5decimal points. Then, the microcontroller deletes the analogue shift andthe speed of the fan decreases. Next, the microcontroller extracts fromthe table the command values immediately greater than the first andmeasures the speed with the same precision. The microcontroller appliesnew command values as long as the measured speed is not equal to orextremely close to the first command value. When this second commandvalue is determined, the microcontroller calculates the difference withthe first value, this difference corresponds to the digital shiftequivalent to the analogue shift.

This operation is carried out for each output port generating a shiftsuch that the absolute values of the digital and analogue shifts are asclose as possible. Advantageously, a variable resistor or any othermanual means for adjusting the shift is implemented in the device. Avisual indication enables the operator to adjust the component so thatthe analogue shift is equal to a determined value. If several outputport are implemented to generate different shifts, this operation isreiterated for each port.

Those skilled in the art can adapt the present invention into many otherspecific forms without moving away from the application domain of theinvention as claimed. In particular, the generation system can beadapted for the generation of signals of all physical sizes used in anyelectronic device. Consequently, the present embodiments must beconsidered as being examples but can be modified in the domain definedby the scope of the attached claims.

1. Method for generating an analogue signal generated from a PWM signalhaving a first period value and a first cyclic ratio value associatedwith a command value, said PWM signal being electrically integrated toproduce the analogue signal, wherein it comprises an application step ofa second period value and a second cyclic ratio value producing a PWMsignal for which the electrically integrated signal is shifted by apredetermined amplitude, and an activation step of an analogue devicegenerating a shift of the analogue signal generated from the PWM signal,the amplitude of the shift of the analogue signal produced from the PWMsignal being identical and in the opposite direction to that produced bythe application of second period and cyclic ratio values.
 2. Method forgenerating an analogue signal according to claim 1, wherein theapplication step of second period and cyclic ratio values, and theactivation step of an analogue device generating a shift are executedwhen the difference between the value of the electrically integratedsignal and the theoretical value obtained from the command value isgreater than a threshold value.
 3. Method for generating an analoguesignal according to claim 2, wherein it comprises the introducing thethreshold value to be compared with the difference.
 4. Method forgenerating an analogue signal according to claim 1, wherein the decisionto execute the two mutually compensating shifts is determined in advancefor all the command values.
 5. Method for generating an analogue signalaccording to claim 1, wherein the execution of the application step ofsecond period and cyclic ratio values, and the execution of theactivation step of an analogue device generating a shift of the analoguesignal are shifted in time.
 6. Method for generating an analogue signalaccording to claim 5, wherein the activation step of the analogue devicegenerating a shift of the analogue signal is executed at the end of thefirst period during which the second period and cyclic ratio values areapplied.
 7. Method for generating an analogue signal according to claim1, wherein, if the analogue device generating a shift of the analoguesignal immediately applies the predetermined amplitude, thenconsecutively at the activation step of the analogue device generating ashift of the analogue signal, the first period and cyclic ratio valuesapplied are increased to take into account the delay in establishing theanalogue signal due to its integration, in such a way as to limit thesharp difference generated by the analogue shift
 8. Method forgenerating an analogue signal according to claim 1, wherein it comprisesthe selecting the value of the shift of the analogue signal from among aplurality of predetermined values.
 9. Method for generating an analoguesignal according to claim 1, wherein it comprises a self-learning stepfor calculating the value of the shift of the analogue signal so thatthis value is identical to the one produced by the application of thesecond period and cyclic ratio values producing a PWM signal for whichthe electrically integrated signal is shifted.
 10. Device for generatingan analogue signal from a PWM signal characterized by a first periodvalue and a first cyclic ratio value associated with a command value,comprising an integration means of the PWM signal to produce an analoguesignal, wherein it comprises a generation means of second period andcyclic ratio values to produce another PWM signal whose electricallyintegrated signal is shifted from a predetermined amplitude, and a meansof shifting the signal generated from the PWM signal and electricallyintegrated producing a shift whose amplitude is identical and in theopposite direction to the one produced by the generation means of secondperiod and cyclic ratio values.
 11. Device for generating an analoguesignal according to claim 10, wherein the generation means of secondperiod and cyclic ratio values and the means of shifting the analoguesignal generated from the PWM signal are activated when the differencebetween the value of the electrically integrated signal and thetheoretical value obtained from the command value is greater than athreshold value.
 12. Device for generating an analogue signal accordingto claim 11, wherein it comprises a means for introducing the thresholdvalue to be compared with the difference.
 13. Device for generating ananalogue signal according to claim 10, wherein the activation of thegeneration means of second period and cyclic ratio values and theactivation of the means of shifting the analogue signal generated fromthe PWM signal are shifted in time.
 14. Device for generating ananalogue signal according to claim 13, wherein the activation of themeans of shifting the analogue signal generated from the PWM signal iscarried out at the end of the first period during which the secondperiod and cyclic ratio values are applied.
 15. Device for generating ananalogue signal according to claim 10, wherein it comprises a means forselecting the value of the shift of the analogue signal from among aplurality of predetermined values.
 16. Device for generating an analoguesignal according to claim 10, wherein it comprises a self-learning meansfor calculating the value of the shift of the analogue signal so thatthis value is identical to the one produced by the application of thesecond period and cyclic ratio values producing a PWM signal for whichthe electrically integrated signal is shifted.